<?php
class SysAccountGroupsForm extends BaseFormAdmin{
	public function configure(){
		$this->setWidget('name', new sfWidgetFormInputText(array(), array('class' => 'required hz-required')));
		$this->setValidator('name', new sfValidatorString(array('max_length' => 255, 'required' => true)));
		
		$types = AdminArrayData::getAccountGroupType();
		$this->setWidget('type', new sfWidgetFormChoice(array('choices'=>AdminArrayData::addNoneItem($types),'expanded'=>false), array('class' => 'required hz-required')));
		$this->setValidator('type', new sfValidatorChoice(array('choices'=>array_keys($types))));
		$this->setDefault('type', '-1');
		
		parent::configure();
	}
}
